package com.unidentifiable._5;

/**
 * @author unidentifiable
 * @date 2021/1/19
 */
public class PriorityDemo {
    public static void main(String[] args) {
        Thread t1 = new Thread(() -> {
            while (true) {
                System.out.println("t1");
            }
        }, "t1");
        Thread t2 = new Thread(() -> {
            while (true) {
                System.out.println("t2");
            }
        }, "t2");

        t1.setPriority(9);
        t2.setPriority(10);

        t1.start();
        t2.start();
    }
}
